import { app } from "../../../app-core/App";
import { inject, injectable } from "../../../app-core/inject";
import { BaseMvpFacade } from "../../../app-core/mvp/base/BaseMvpFacade";
import { UIID } from "../../UIConfigs";
import { LoginModel } from "./model/LoginModel";
import LoginPresenter from "./presenter/LoginPresenter";
import { LoginViewer } from "./viewer/LoginViewer";

@injectable('LoginFacade1')
export class LoginFacade extends BaseMvpFacade {

    @inject('LoginPresenter')
    loginPresenter: LoginPresenter;

    @inject('LoginModel')
    loginModel: LoginModel;

    init(): boolean {
        return true;
    }

    openLoginView() {
        app.ui.open(UIID.Login, { viewer: LoginViewer })
    }
}